<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {% if title %}
        <title>{{ title }}-Flask学习</title>
    {% else %}
        <title>Flask学习</title>
    {% endif %}
</head>
<body>
    <div style="background-color: aquamarine;">Flask学习
        <a href="{{ url_for('index') }}">首页</a>
        {% if g.user.is_authenticated() %}
        |<a href="{{ url_for('logout') }}">退出登录</a>
        {% endif %}
    </div>
    <hr>
    {#显示 “闪现” 消息#}
    {% with messages=get_flashed_messages() %}
    {% if messages %}
    <ul>
        {% for message in messages %}
            <li>{{ message }}</li>
        {% endfor %}
    </ul>
    {% endif %}
    {% endwith %}

    {% block content %}{% endblock %}
</body>
</html>